PROJECT(CppBaseTest)
CMAKE_MINIMUM_REQUIRED(VERSION 3.21)

MESSAGE("#### C COMPILE FEATURES:")
FOREACH(feature ${CMAKE_C_COMPILE_FEATURES})
    MESSAGE("  ${feature}")
ENDFOREACH()

MESSAGE("#### CXX COMPILE FEATURES:")
FOREACH(feature ${CMAKE_CXX_COMPILE_FEATURES})
    MESSAGE("  ${feature}")
ENDFOREACH()

SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c17")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++20")

MESSAGE("#### project source dir: ${PROJECT_SOURCE_DIR}")
SET(PATH_SRC_FILES ${PROJECT_SOURCE_DIR}/./../../demo/CppBaseTest)
MESSAGE("#### path src files: ${PATH_SRC_FILES}")

INCLUDE_DIRECTORIES(${PATH_SRC_FILES})

FILE(GLOB_RECURSE CPP_LIST ${PATH_SRC_FILES}/*.cpp)
FILE(GLOB_RECURSE C_LIST ${PATH_SRC_FILES}/*.c)

ADD_EXECUTABLE(CppBaseTest ${CPP_LIST} ${C_LIST})
TARGET_LINK_LIBRARIES(CppBaseTest pthread)
